package com.szly.phm.common.mapper;
;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.szly.phm.common.entity.dto.user.ImportUsers;
import com.szly.phm.common.entity.dto.user.UserPageDTO;
import com.szly.phm.common.entity.po.SysUser;
import com.szly.phm.common.entity.vo.role.UserRoleV1VO;
import com.szly.phm.common.entity.vo.role.UserRoleVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2021-07-05
 */

public interface SysUserMapper extends BaseMapper<SysUser> {

    //根据名称查询
    SysUser selectUserByUserName(String username);
    //根据手机查询
    SysUser selectUserByMobile(String mobile);
    //根据邮箱查询
    SysUser selectUserByMailbox(String Mailbox);
    //根据证件查询
    SysUser selectUserByCertificatesId(String CertificatesId);
    //分页查询用户
    List<SysUser> selectUsersPage(UserPageDTO userPageDTO);

    /**
     * 根据用户Id查询用户详细信息
     * @author zq
     * @date 2021/7/9
     */
    SysUser selectUserDetailByUserId(String userId);

    List<Map<String,Object>> selectUserByUserRoleName(String orgId,String roleName,String queryName);

    List<Map<String,Object>> selectUserByUserId(String[] userId);

    List<UserRoleVO> selectRolesByUserId(String userId);
    List<UserRoleV1VO> selectRolesByUserIdV1(String userId);


}
